package DesignPatern.A08_调停者模式.A001_问题;

/**
 * @Author: Du
 * @Date: 2021/7/23 8:09
 */
public class Stock
{
    private static int COMPUTER_NUMBER = 100;
    
    public void increase(int number)
    {
        COMPUTER_NUMBER += number;
        System.out.println("库存数量" + COMPUTER_NUMBER);
    }
    
    public void decrease(int number)
    {
        COMPUTER_NUMBER -= number;
        System.out.println("库存数量" + COMPUTER_NUMBER);
    }
    
    public int getStockNumber()
    {
        return COMPUTER_NUMBER;
    }
    
    public void clearStock()
    {
        Purchase purchase = new Purchase();
        Sale sale = new Sale();
        System.out.println("清理货存数量："+COMPUTER_NUMBER);
        sale.offSale();
        purchase.refuseIBM();
    }
}

